//
// Created by 11510 on 2024/6/23.
//

#ifndef TEXTQUERY_BINARYQUERY_H
#define TEXTQUERY_BINARYQUERY_H

#include "Query.h"
#include "QueryBase.h"

class BinaryQuery : public QueryBase {

protected:
    BinaryQuery(const Query &l, const Query &r, std::string s)
            : lhs(l), rhs(r), opSym(s) {}

    std::string rep() const {
        return "(" + lhs.rep() + " "
               + opSym + " "
               + rhs.rep() + ")";
    }

    Query lhs, rhs; // 左侧和右侧运算对象
    std::string opSym; // 运算符名


};


#endif //TEXTQUERY_BINARYQUERY_H
